/**
 *
 */
package com.zhuoyue.zhtj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.eit.eitsite.common.persistence.Page;
import com.eit.eitsite.common.service.CrudService;
import com.zhuoyue.zhtj.entity.Dmxx;
import com.zhuoyue.zhtj.dao.DmxxDao;

/**
 * 弹幕信息Service
 *
 * @author hss
 * @version 2017-08-17
 */
@Service
@Transactional(readOnly = true)
public class DmxxService extends CrudService<DmxxDao, Dmxx> {
    @Autowired
    private DmxxDao dmxxDao;

    public Dmxx get(String id) {
        return super.get(id);
    }

    public List<Dmxx> findList(Dmxx dmxx) {
        return super.findList(dmxx);
    }

    public Page<Dmxx> findPage(Page<Dmxx> page, Dmxx dmxx) {
        return super.findPage(page, dmxx);
    }

    @Transactional(readOnly = false)
    public void save(Dmxx dmxx) {
        String nr=dmxx.getNr();
        if(nr!=null&&!"".equals(nr)){
            super.save(dmxx);
        }
//        super.save(dmxx);
    }

    @Transactional(readOnly = false)
    public void delete(Dmxx dmxx) {
        super.delete(dmxx);
    }

    public List<Dmxx> getDmInfo() {
        return dmxxDao.getDmInfo();
    }

    @Transactional(readOnly = false)
    public void deleteById(List<Dmxx> list){dmxxDao.deleteById(list);}

    @Transactional(readOnly = false)
    public void updateDmStatus(List<Dmxx> list) {
        dmxxDao.updateDmStatus(list);
    }

}